import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Transform Widget Demo"),
      ),
      body: PaddingMarginWidget(),
    ),
  ));
}

class PaddingMarginWidget extends StatelessWidget {
  const PaddingMarginWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Container(
          margin: const EdgeInsets.all(0.0), //容器外补白
          color: Colors.orange,
          child: const Text("Hello World"),
        ),
        Container(
          padding: const EdgeInsets.all(20.0),
          color: Colors.orange,
          child: const Text("Hello World"),
        ),
      ],
    );
  }
}
